﻿@using ZoomLa.Common
@{
    
    int step = DataConverter.CLng(ViewBag.step);
    bool showmsg = !string.IsNullOrEmpty(ViewBag.msg);
}
@section head{
    <title>修改邮箱</title>
}
@section content{
    <div id="pageflag" data-nav="group" data-ban="ChangeEmail"></div>
    <div class="container margin_t5">
        <ol class="breadcrumb">
            <li><a title="会员中心" href="/User/Default">会员中心</a></li>
            <li><a title="用户信息" href="/User/Info/UserInfo">用户信息</a></li>
            <li class="active">修改邮箱</li>
        </ol>
    </div>
    <div class="container btn_green">
        @if (showmsg){ <div class="alert alert-@ViewBag.msgtype" style="margin-top:0px;margin-bottom:5px;">@MvcHtmlString.Create(ViewBag.msg)</div> }
        @if (step != 2)
        {
            <form method="post" action="/User/Change/Email_1">
                <table class="table table-striped table-bordered table-hover">
                    <tr>
                        <td class="td_m">原邮箱：</td>
                        <td>
                            <div class="input-group text_400">
                                <span class="form-control text_400">@ViewBag.email</span>
                                <span class="input-group-btn">
                                    <a href="Email_SendEmail" class="btn btn-primary">发送验证邮件</a>
                                </span>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>验证码：</td>
                        <td>
                            <input type="text" id="checknum" name="checknum" class="form-control text_300" />
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <input type="submit" value="下一步" class="btn btn-info" />
                        </td>
                    </tr>
                </table>
            </form>
        }
        else
        {
            <form method="post" action="/User/Change/Email_2">
                <table class="table table-bordered table-striped">
                    <tr>
                        <td class="td_m">新邮箱：</td>
                        <td>
                            <div class="input-group text_400">
                                <input type="text" id="newemail" name="newemail" value="@ViewBag.newemail" class="form-control text_400 required email" />
                                <span class="input-group-btn">
                                    <input type="button" id="sendNewEmail" value="发送邮件" onclick='location.href = "Email_SendNewEmail?newemail=" + $("#newemail").val();' class="btn btn-info" />
                                </span>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>验证码：</td>
                        <td>
                            <input type="text" name="newchecknum" class="form-control text_300" />
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <input type="submit" class="btn btn-primary" value="提交" />
                        </td>
                    </tr>
                </table>
            </form>
        }
    </div>
}
@section script{
<script>
    $(function () {
        $("form").validate();
    });
</script>
}
